package com.chahu.mapper;

import com.chahu.entity.Snack;

import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Select;

import java.util.List;

public interface SnackMapper {

    @Select("select * from snacks where category_id = 1")
    List<Snack> getSnackList();
    
    @Select("select * from snacks limit #{arg0}, #{arg1}")
    List<Snack> page(int page, int pageSize);
    
    @Delete("delete from snacks where id = #{arg0}")
    void deleteById(int id);
}
